package com.medusa.aps.business.modules.basic.model.output;

import com.medusa.aps.business.modules.basic.mp.entity.WorkingCalendar;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 工作日历模型
 *
 * @author shenzhiwei
 */
@Data
@Accessors(chain = true)
@ToString
public class CalendarModel implements Serializable {

    /**
     * 主键id
     */
    @Schema(description = "日历主键id")
    @NotNull(message = "工作日历id不能为空")
    private Integer id;

    /**
     * 工作时段id
     */
    @NotNull(message = "工作时段id不能为空")
    @Schema(description = "工作时段id，0表示休息，不为0表示工作时段且periodInfo有值")
    private Integer periodId;

    /**
     * 是否编辑
     */
    @Schema(description = "是否编辑")
    private Boolean isEdit;

    /**
     * 工作时段详情
     */
    @Schema(description = "工作时段详情")
    private WorkingCalendar.WorkingTimeInfo periodInfo;

}
